import java.util.concurrent.*;

public class ThreadPool {
    static String getFutureData() throws Exception {
        ExecutorService service = Executors.newFixedThreadPool(4);
        Callable<String> task = new Task();
        Future<String> future = service.submit(task);
        String result = future.get();
        service.shutdown();
        return result;
    }
}

class Task implements Callable<String> {
    @Override
    public String call() throws Exception {
        return "callable result";
    }
}
